﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.Master" CodeBehind="WebForm1.aspx.cs" Inherits="DECOR.WebApp.WebForm1" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<%@ Register assembly="IdeaSparx.CoolControls.Web" namespace="IdeaSparx.CoolControls.Web" tagprefix="cc2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
                <cc1:TabContainer ID="tcMain" runat="server" TabStripPlacement="Top" ActiveTabIndex="1" 
                    Height="310px" Enabled="false">
                <cc1:TabPanel ID="tpCabecera" runat="server">
                    <HeaderTemplate>Datos de Cliente</HeaderTemplate>
                    <ContentTemplate>
                        <!-- Datos de Cabecera -->
                        <table id="htbParams" class="tbl-params" border="0" cellpadding="1" cellspacing="1" >
                            <script type="text/javascript" language="javascript">
                                function getCodigo(source, eventArgs)
                                {
                                    $get('<%= txtCodCliente.ClientID %>').value = eventArgs.get_value();
                                }
                                function getCodNuevoMat(source, eventArgs){
                                    $get('<%= txtCodNuevoMat.ClientID %>').value = eventArgs.get_value();
                                }
                                function getCodigoSolicitante(source, eventArgs)
                                {
                                    $get('<%= txtCodSolicitante.ClientID %>').value = eventArgs.get_value();
                                    $get('<%= txtDirSolicitante.ClientID %>').value = "";
                                    $get('<%= ddlCodpSolicitante.ClientID %>').value = "";
                                    $get('<%= txtTelSolicitante.ClientID %>').value = "";
                                    $get('<%= txtNifSolicitante.ClientID %>').value = "";
                                    $get('<%= txtNifSolicitante.ClientID %>').value = "";
                                }
                                function getCodigoDestMerc(source, eventArgs)
                                {
                                    $get('<%= txtCodDestMerc.ClientID %>').value = eventArgs.get_value();
                                    $get('<%= txtDirDestMerc.ClientID %>').value = "";
                                    $get('<%= ddlCodpDestMerc.ClientID %>').value = "";
                                    $get('<%= txtTelDestMerc.ClientID %>').value = "";
                                }
                                function getCodigoDestFact(source, eventArgs)
                                {
                                    $get('<%= txtCodDestFact.ClientID %>').value = eventArgs.get_value();
                                    $get('<%= txtDirDestFact.ClientID %>').value = "";
                                    $get('<%= ddlCodpDestFact.ClientID %>').value = "";
                                    $get('<%= txtTelDestFact.ClientID %>').value = "";
                                }
                                function getCodigoResPago(source, eventArgs)
                                {
                                    $get('<%= txtCodResPago.ClientID %>').value = eventArgs.get_value();
                                    $get('<%= txtDirResPago.ClientID %>').value = "";
                                    $get('<%= ddlCodpResPago.ClientID %>').value = "";
                                    $get('<%= txtTelResPago.ClientID %>').value = "";
                                    $get('<%= txtNifResPago.ClientID %>').value = "";
                                }
                                function getCodigoAgTrans(source, eventArgs)
                                {
                                    $get('<%= txtCodAgTrans.ClientID %>').value = eventArgs.get_value();
                                }
                                function getCodigoProfesional(source, eventArgs)
                                {
                                    $get('<%= txtCodProfesional.ClientID %>').value = eventArgs.get_value();
                                }
                            </script>
                            <tr>
                                <td></td>
                                <td>
                                    <asp:Label ID="lblCodigoCliente" runat="server" Text="Código" Height="10" />
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <asp:Label ID="lblRazonSocial" runat="server" Text="Razón Social"  />
                                </td>
                            </tr>
                            <tr>
                                <td style="vertical-align: top;">
                                    Cliente <br />
                                    <asp:LinkButton ID="lnkShowPopUpInt" runat="server" Text="Datos de Cliente" />
                                </td>

                                <td>

                                   <asp:TextBox ID="txtCodCliente" runat="server" CssClass="inputbox" MaxLength="10" 
                                        AutoCompleteType="Company" Width="80px" AutoPostBack="True" 
                                        OnTextChanged="txtCodCliente_TextChanged" />
                                    <cc1:FilteredTextBoxExtender ID="ftbeCodCliente" runat="server" TargetControlID="txtCodCliente"
                                                FilterType="Numbers" Enabled="True" />
                                    
                                    
                                    <asp:TextBox ID="txtNomCliente" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                                Width="200px" AutoPostBack="True" />
                                    <cc1:AutoCompleteExtender ID="aceNomCliente" runat="server" TargetControlID="txtNomCliente"
                                        MinimumPrefixLength="1" CompletionInterval="100" CompletionSetCount="15"
                                        CompletionListCssClass="autocomplete_completionListElement"
                                        CompletionListItemCssClass="autocomplete_listItem"
                                        CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
                                        DelimiterCharacters=""
                                        ServiceMethod="buscaClientes"
                                        OnClientItemSelected="getCodigo" Enabled="True" ServicePath="">
                                    </cc1:AutoCompleteExtender>

                                    <asp:TextBox ID="txtDirCliente" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                                Width="350px" ReadOnly="True" />
                                </td>
                            </tr>
                            
                            <tr><td style="height:20px; vertical-align:middle;" colspan="2"><hr /></td></tr>

                            <tr>
                                <td colspan="2">
                                    <table style="width:100%;">
                                        <tr>
                                            <td>
                                                Org. Ventas <br />
                                                <asp:LinkButton ID="lnkShowPopUpTextos" runat="server" Text="Observaciones" />
                                                <asp:LinkButton ID="lnkShowPopUpServicios" runat="server" Text="Datos del Servicios" Visible="false" />
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="cmbOrgVtas" runat="server" Width="200px"
                                                    OnSelectedIndexChanged="cmbOrgVtas_SelectedIndexChanged" 
                                                    AutoPostBack="True" />
                                            </td>
                                            <td>
                                                Canal
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="cmbCanalDist" runat="server" Width="200px" />
                                            </td>
                                            <td>
                                                Oficina
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="cmbOficina" runat="server" Width="200px" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            
                            <tr><td style="height:20px; vertical-align:middle;" colspan="2"><hr /></td></tr>
                            
                            <tr>
                                <td colspan="2">
                                    <table style="width:100%;">
                                        <tr>
                                            <td>
                                                Condición Pago
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="cmbCondicionesPago" runat="server" Width="200px" />
                                            </td>
                                            <td>
                                                Bloqueo Entrega
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="cmbBloqueoEntrega" runat="server" Width="200px" Enabled="false" />
                                            </td>
                                            <td>
                                                Moneda
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="cmbMoneda" runat="server" Width="70px" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Tipo de despacho.
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="cmbCondExp" runat="server" Width="200px" AutoPostBack="True" 
                                                    OnSelectedIndexChanged="cmbCondExp_SelectedIndexChanged" />
                                            </td>
                                            <td>
                                                Bloqueo Factura
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="cmbBloqueoFactura" runat="server" Width="200px" Enabled="false" />
                                            </td>
                                            <td>
                                                Tipo Cambio
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtTipoCambio" runat="server" CssClass="inputbox" 
                                                            Width="40px" MaxLength="6" ReadOnly="True" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Fecha de Entrega
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtFechaEntrega" runat="server" Width="70px" CssClass="inputbox" 
                                                    Font-Size="10pt" AutoPostBack="true" OnTextChanged="txtFechaEntrega_TextChanged" />
                                                <cc1:CalendarExtender ID="ceFechaEntrega" runat="server" TargetControlID="txtFechaEntrega"
                                                    Format="dd/MM/yyyy" CssClass="MyCalendar" Enabled="True">
                                                </cc1:CalendarExtender>
                                            </td>
                                            <td>
                                                Nombre banco
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="cmbGrupoCond" runat="server" Width="200px" />
                                            </td>
                                            <td>
                                                Validez
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtFechaValidez" runat="server" Width="70px"
                                                    CssClass="inputbox" Font-Size="10pt" />
                                                <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtFechaValidez"
                                                    Format="dd/MM/yyyy" CssClass="MyCalendar" Enabled="True">
                                                </cc1:CalendarExtender>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                N° de Orden de Compra
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtOrdenCompra" runat="server" CssClass="inputbox" 
                                                    Width="150px" MaxLength="35" />
                                            </td>
                                            <td>
                                                Motivo de NC o ND
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="cmbMotivo" runat="server" Width="200px" />
                                            </td>
                                            <td>
                                                Fecha Pedido</td>
                                            <td>
                                                <asp:TextBox ID="txtFecha" runat="server" Width="70px"
                                                    CssClass="inputbox" ReadOnly="true" Font-Size="10pt" />
                                            </td>

                                        </tr>
                                        <tr>
                                            <td>
                                                Fecha de Facturación</td>
                                            <td>
                                                <asp:TextBox ID="txtFechaFact" runat="server" Width="70px"
                                                    CssClass="inputbox" ReadOnly="false" Font-Size="10pt" />
                                            </td>                                        
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                        
                        <cc1:ModalPopupExtender ID="mpeInterlocutores" runat="server" TargetControlID="lnkShowPopUpInt"
                                    PopupControlID="pnlInterlocutores" CancelControlID="btnClose"
                                    BackgroundCssClass="modalBackground" PopupDragHandleControlID="pnlTitulo" 
                                    DynamicServicePath="" Enabled="True" />

                        <asp:Panel ID="pnlInterlocutores" runat="server" ScrollBars="Auto" Width="940px" CssClass="modalPopup">
                            <asp:Panel ID="pnlTitulo" runat="server" Width="940px" BackColor="LightBlue" 
                                HorizontalAlign="Center">
                                <asp:Label ID="lblDetalleInterlocuroes" runat="server" 
                                    Text="Detalle de Cliente" BackColor="LightBlue" Width="100%" />
                            </asp:Panel>
                            <table class="tbl-detalle">
                                <tr>
                                    <th style="width: 120px;">Func. interl.</th>
                                    <th style="width:80px;">Interl.</th>
                                    <th style="width:200px;">Nom.</th>
                                    <th style="width:200px;">Calle</th>
                                    <th style="width:180px;">Ubicación</th>
                                    <th style="width:80px;">Tel.</th>
                                    <th style="width:80px;">NIF</th>
                                </tr>
                                <tr><td style="height:20px; vertical-align:middle;" colspan="8"><hr /></td></tr>
                                
                                <tr>
                                    <td style="text-align:left;">
                                        Solicitante
                                    </td>
                                    <td style="text-align:left;">
                                        <asp:TextBox ID="txtCodSolicitante" runat="server" CssClass="inputbox" MaxLength="10" 
                                            AutoCompleteType="Company" Width="80px" ReadOnly="True" />
                                        <cc1:FilteredTextBoxExtender ID="ftbeCodSolicitante" runat="server" TargetControlID="txtCodSolicitante"
                                                FilterType="Numbers" Enabled="True" />
                                    </td>
                                    <td style="text-align:center;">
                                        <asp:TextBox ID="txtNomSolicitante" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                                    Width="180px" ReadOnly="True" MaxLength="70" />
                                        <cc1:AutoCompleteExtender ID="aceNomSolicitante" runat="server" TargetControlID="txtNomSolicitante"
                                            MinimumPrefixLength="1" CompletionInterval="100" CompletionSetCount="15"
                                            CompletionListCssClass="autocomplete_completionListElement"
                                            CompletionListItemCssClass="autocomplete_listItem"
                                            CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
                                            DelimiterCharacters=""
                                            ServiceMethod="buscaClientes"
                                            OnClientItemSelected="getCodigoSolicitante" Enabled="True" ServicePath="">
                                        </cc1:AutoCompleteExtender>
                                    </td>
                                    <td style="text-align:center;">
                                        <asp:TextBox ID="txtDirSolicitante" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                                    Width="180px" ReadOnly="True" MaxLength="35" />
                                    </td>
                                    <td style="text-align:center;">
                                        <asp:DropDownList ID="ddlCodpSolicitante" runat="server" Width="180px" Enabled="false" />
                                    </td>
                                    <td style="text-align:center; vertical-align:top;width:80px;">
                                        <asp:TextBox ID="txtTelSolicitante" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                                    Width="70px" ReadOnly="True" MaxLength="16" />
                                    </td>
                                    <!-- NIF Solicitante -->
                                    <td style="text-align:left;">
                                        <asp:TextBox ID="txtNifSolicitante" runat="server" CssClass="inputbox" 
                                            MaxLength="11" Width="80px" ReadOnly="True" />
                                        <cc1:FilteredTextBoxExtender ID="ftbeNifSolicitante" runat="server" TargetControlID="txtNifSolicitante"
                                                FilterType="Numbers" Enabled="True" />
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td style="text-align:left;">
                                        Dest. Mcía.
                                    </td>
                                    <td style="text-align:left;">
                                        <asp:TextBox ID="txtCodDestMerc" runat="server" CssClass="inputbox" MaxLength="10" 
                                            AutoCompleteType="Company" Width="80px" />
                                    </td>
                                    <td style="text-align:center;">
                                        <asp:TextBox ID="txtNomDestMerc" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                                    Width="180px" MaxLength="70" />
                                        <cc1:AutoCompleteExtender ID="AutoCompleteExtender3" runat="server" TargetControlID="txtNomDestMerc"
                                            MinimumPrefixLength="1" CompletionInterval="100" CompletionSetCount="15"
                                            CompletionListCssClass="autocomplete_completionListElement"
                                            CompletionListItemCssClass="autocomplete_listItem"
                                            CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
                                            DelimiterCharacters=""
                                            ServiceMethod="buscaClientes"
                                            OnClientItemSelected="getCodigoDestMerc" Enabled="True" ServicePath="">
                                        </cc1:AutoCompleteExtender>
                                    </td>
                                    <td style="text-align:center;">
                                        <asp:TextBox ID="txtDirDestMerc" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                                    Width="180px" MaxLength="35" />
                                    </td>
                                    <td style="text-align:center;">
                                        <asp:DropDownList ID="ddlCodpDestMerc" runat="server" Width="180px" />
                                    </td>
                                    <td style="text-align:center; vertical-align:top;width:80px;">
                                        <asp:TextBox ID="txtTelDestMerc" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                                    Width="70px" MaxLength="16" />
                                    </td>
                                    <td style="text-align:left;">
                                        &nbsp;
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td style="text-align:left;">
                                        Dest. Factura
                                    </td>
                                    <td style="text-align:left;">
                                        <asp:TextBox ID="txtCodDestFact" runat="server" CssClass="inputbox" MaxLength="10" 
                                            AutoCompleteType="Company" Width="80px" />
                                        <cc1:FilteredTextBoxExtender ID="ftbeCodDestFact" runat="server" TargetControlID="txtCodDestFact"
                                                FilterType="Numbers" Enabled="True" />
                                    </td>
                                    <td style="text-align:center;">
                                        <asp:TextBox ID="txtNomDestFact" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                                    Width="180px" MaxLength="70" />
                                        <cc1:AutoCompleteExtender ID="AutoCompleteExtender4" runat="server" TargetControlID="txtNomDestFact"
                                            MinimumPrefixLength="1" CompletionInterval="100" CompletionSetCount="15"
                                            CompletionListCssClass="autocomplete_completionListElement"
                                            CompletionListItemCssClass="autocomplete_listItem"
                                            CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
                                            DelimiterCharacters=""
                                            ServiceMethod="buscaClientes"
                                            OnClientItemSelected="getCodigoDestFact" Enabled="True" ServicePath="">
                                        </cc1:AutoCompleteExtender>
                                    </td>
                                    <td style="text-align:center;">
                                        <asp:TextBox ID="txtDirDestFact" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                                    Width="180px" MaxLength="35" />
                                    </td>
                                    <td style="text-align:center;">
                                        <asp:DropDownList ID="ddlCodpDestFact" runat="server" Width="180px" />
                                    </td>
                                    <td style="text-align:center; vertical-align:top;width:80px;">
                                        <asp:TextBox ID="txtTelDestFact" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                                    Width="70px" MaxLength="16" />
                                    </td>
                                    <td style="text-align:left;">
                                        &nbsp;
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td style="text-align:left;">
                                        Resp. Pago
                                    </td>
                                    <td style="text-align:left;">
                                        <asp:TextBox ID="txtCodResPago" runat="server" CssClass="inputbox" MaxLength="10" 
                                            AutoCompleteType="Company" Width="80px" />
                                        <cc1:FilteredTextBoxExtender ID="ftbeCodResPago" runat="server" 
                                                TargetControlID="txtCodResPago" FilterType="Numbers" Enabled="True" />
                                    </td>
                                    <td style="text-align:center;">
                                        <asp:TextBox ID="txtNomResPago" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                                    Width="180px" MaxLength="70" />
                                        <cc1:AutoCompleteExtender ID="AutoCompleteExtender5" runat="server" TargetControlID="txtNomResPago"
                                            MinimumPrefixLength="1" CompletionInterval="100" CompletionSetCount="15"
                                            CompletionListCssClass="autocomplete_completionListElement"
                                            CompletionListItemCssClass="autocomplete_listItem"
                                            CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
                                            DelimiterCharacters=""
                                            ServiceMethod="buscaClientes"
                                            OnClientItemSelected="getCodigoResPago" Enabled="True" ServicePath="">
                                        </cc1:AutoCompleteExtender>
                                    </td>
                                    <td style="text-align:center;">
                                        <asp:TextBox ID="txtDirResPago" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                                    Width="180px" MaxLength="35" />
                                    </td>
                                    <td style="text-align:center;">
                                        <asp:DropDownList ID="ddlCodpResPago" runat="server" Width="180px" />
                                    </td>
                                    <td style="text-align:center; vertical-align:top;width:80px;">
                                        <asp:TextBox ID="txtTelResPago" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                                    Width="70px" MaxLength="16" />
                                    </td>
                                    <!-- NIF Resp Pago -->
                                    <td style="text-align:left;">
                                        <asp:TextBox ID="txtNifResPago" runat="server" CssClass="inputbox" 
                                            MaxLength="11" Width="80px" />
                                        <cc1:FilteredTextBoxExtender ID="ftbeNifResPago" runat="server" 
                                                TargetControlID="txtNifResPago" FilterType="Numbers" Enabled="True" />
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td style="text-align:left;">
                                        Ag. Transporte
                                    </td>
                                    <td style="text-align:left;">
                                        <asp:TextBox ID="txtCodAgTrans" runat="server" CssClass="inputbox" MaxLength="10" 
                                            AutoCompleteType="Company" Width="80px" />
                                        <cc1:FilteredTextBoxExtender ID="ftbeCodAgTrans" runat="server" 
                                                TargetControlID="txtCodAgTrans" FilterType="Numbers" Enabled="True" />
                                    </td>
                                    <td style="text-align:center;">
                                        <asp:TextBox ID="txtNomAgTrans" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                                    Width="180px" MaxLength="70" />
                                        <cc1:AutoCompleteExtender ID="AutoCompleteExtender6" runat="server" TargetControlID="txtNomAgTrans"
                                            MinimumPrefixLength="1" CompletionInterval="100" CompletionSetCount="15"
                                            CompletionListCssClass="autocomplete_completionListElement"
                                            CompletionListItemCssClass="autocomplete_listItem"
                                            CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
                                            DelimiterCharacters=""
                                            ServiceMethod="buscaClientes"
                                            OnClientItemSelected="getCodigoAgTrans" Enabled="True" ServicePath="">
                                        </cc1:AutoCompleteExtender>
                                    <td style="text-align:center;">
                                        Correo
                                    </td>
                                    <td style="text-align:center;">
                                        <asp:TextBox ID="txtCorreo" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                          Width="180px" ReadOnly="false" />
                                    </td>
                                    <td style="text-align:center;">
                                        &nbsp;
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td style="text-align:left;">
                                        Enc. Comercial
                                    </td>
                                    <td style="text-align:left;">
                                        <asp:TextBox ID="txtCodVendedor1" runat="server" CssClass="inputbox" MaxLength="10" 
                                            AutoCompleteType="Company" Width="80px" ReadOnly="True" />
                                    </td>
                                    <td style="text-align:center;">
                                        <asp:TextBox ID="txtNomVendedor1" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                                    Width="180px" ReadOnly="True" />
                                    </td>
                                    <td style="text-align:center;">
                                        &nbsp;
                                    </td>
                                    <td style="text-align:center;">
                                        &nbsp;
                                    </td>
                                    <td style="text-align:center;">
                                        &nbsp;
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td style="text-align:left;">
                                        Vendedor 2
                                    </td>
                                    <td style="text-align:left;">
                                        <asp:TextBox ID="txtCodVendedorWeb" runat="server" CssClass="inputbox" MaxLength="10" 
                                            AutoCompleteType="Company" Width="80px" ReadOnly="True" />
                                    </td>
                                    <td style="text-align:center;">
                                        <asp:TextBox ID="txtNomVendedorWeb" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                                    Width="180px" ReadOnly="True" />
                                    </td>
                                    <td style="text-align:center;">
                                        &nbsp;
                                    </td>
                                    <td style="text-align:center;">
                                        &nbsp;
                                    </td>
                                    <td style="text-align:center;">
                                        &nbsp;
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td style="text-align:left;">
                                        Vendedor 3
                                    </td>
                                    <td style="text-align:left;">
                                        &nbsp;</td>
                                    <td style="text-align:center;">
                                        <asp:DropDownList ID="cmbVendedor2" runat="server" Width="180px" />
                                    </td>
                                    <td style="text-align:center;">
                                        &nbsp;
                                    </td>
                                    <td style="text-align:center;">
                                        &nbsp;
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td style="text-align:left;">
                                        Vendedor 4
                                    </td>
                                    <td style="text-align:left;">
                                        &nbsp;</td>
                                    <td style="text-align:center;">
                                        <asp:DropDownList ID="cmbVendedor3" runat="server" Width="180px" />
                                    </td>
                                    <td style="text-align:center;">
                                        &nbsp;
                                    </td>
                                    <td style="text-align:center;">
                                        &nbsp;
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td style="text-align:left;">
                                        Profesional
                                    </td>
                                    <td style="text-align:left;">
                                        <asp:TextBox ID="txtCodProfesional" runat="server" CssClass="inputbox" MaxLength="10" 
                                            AutoCompleteType="Company" Width="80px" />
                                        <cc1:FilteredTextBoxExtender ID="ftbeCodProfesional" runat="server" 
                                                TargetControlID="txtCodProfesional" FilterType="Numbers" 
                                            Enabled="True" />
                                    </td>
                                    <td colspan="5" style="text-align:left;">
                                        <asp:TextBox ID="txtNomProfesional" runat="server" CssClass="inputbox" AutoCompleteType="Disabled"
                                                    Width="180px" MaxLength="70" />
                                        <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" 
                                            TargetControlID="txtNomProfesional" CompletionInterval="100" CompletionSetCount="3"
                                            CompletionListCssClass="autocomplete_completionListElement"
                                            CompletionListItemCssClass="autocomplete_listItem"
                                            CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
                                            DelimiterCharacters=""
                                            ServiceMethod="buscaProfesionales"
                                            OnClientItemSelected="getCodigoProfesional" Enabled="True" ServicePath="">
                                        </cc1:AutoCompleteExtender>
                                    </td>
                                </tr>
                            </table>
                                
                            <div style="width:100%; text-align:right; padding-top:5px;">
                                <asp:ImageButton ID="btnGrabarInterlocutores" runat="server" ImageUrl="~/img/ok16.png" 
                                                ImageAlign="Middle" OnClick="btnGrabarInterlocutores_Click" />
                                <asp:ImageButton ID="btnClose" runat="server" ImageUrl="~/img/cancel16.png" 
                                                ImageAlign="Middle" />
                            </div>

                        </asp:Panel>

                        <cc1:ModalPopupExtender ID="mpeTextos" runat="server" TargetControlID="lnkShowPopUpTextos"
                                    PopupControlID="pnlTextos" CancelControlID="btnCloseTextos"
                                    BackgroundCssClass="modalBackground" PopupDragHandleControlID="pnlTituloTextos" 
                                    DynamicServicePath="" Enabled="True" />

                        <asp:Panel ID="pnlTextos" runat="server" ScrollBars="Auto" Width="770px" CssClass="modalPopup">
                            <asp:Panel ID="pnlTituloTextos" runat="server" Width="770px" 
                                BackColor="LightBlue" HorizontalAlign="Center">
                                <asp:Label ID="Label2" runat="server" Text="Detalle de Textos" 
                                        BackColor="LightBlue" Width="100%" />
                            </asp:Panel>
                            
                            <cc1:TabContainer ID="tcTextos" runat="server" 
                                ActiveTabIndex="0" CssClass="">
                                <cc1:TabPanel ID="tpAtencion" runat="server" Visible="true" ><HeaderTemplate>Atención</HeaderTemplate><ContentTemplate><asp:TextBox ID="txtTextoAtencion" runat="server" Columns="90" Rows="10" TextMode="MultiLine" /></ContentTemplate></cc1:TabPanel>
                                <cc1:TabPanel ID="tpTransporte" runat="server"  Visible="false" ><HeaderTemplate>Transporte</HeaderTemplate><ContentTemplate><asp:TextBox ID="txtTextoTransporte" runat="server" Columns="90" Rows="10" 
                                            TextMode="MultiLine" /></ContentTemplate></cc1:TabPanel>
                                <cc1:TabPanel ID="tpTiempoEntrega" runat="server"  Visible="false"><HeaderTemplate>Tiempo de Entrega Aprox.</HeaderTemplate><ContentTemplate><asp:TextBox ID="txtTextoTiempoEntrega" runat="server" Columns="90" Rows="10" 
                                            TextMode="MultiLine" /></ContentTemplate></cc1:TabPanel>
                                <cc1:TabPanel ID="tpJefeTienda" runat="server" Visible="false" ><HeaderTemplate>Jefe de Tienda</HeaderTemplate><ContentTemplate><asp:TextBox ID="txtTextoJefeTienda" runat="server" Columns="90" Rows="10" 
                                            TextMode="MultiLine" /></ContentTemplate></cc1:TabPanel>
                                <cc1:TabPanel ID="tpObsAdministrativas" runat="server"><HeaderTemplate>Obs. Administrativas</HeaderTemplate><ContentTemplate><asp:TextBox ID="txtTextoObsAdministrativas" runat="server" Columns="90" 
                                            Rows="10" TextMode="MultiLine" /></ContentTemplate></cc1:TabPanel>
                                <cc1:TabPanel ID="tpReferenciaFactura" runat="server" Visible="true" ><HeaderTemplate>Ref. a Factura</HeaderTemplate><ContentTemplate><asp:TextBox ID="txtTextoRefFactura" runat="server" Columns="90" Rows="10" 
                                            TextMode="MultiLine" /></ContentTemplate></cc1:TabPanel>
                                <cc1:TabPanel ID="tpRefDireccion" runat="server" Visible="true"  ><HeaderTemplate>Ref. de Dirección</HeaderTemplate><ContentTemplate><asp:TextBox ID="txtTextoRefDireccion" runat="server" Columns="90" Rows="10" TextMode="MultiLine" /></ContentTemplate></cc1:TabPanel>
                            </cc1:TabContainer>
                            
                            <div style="width:100%; text-align:right; padding-top:5px;">
                                <asp:ImageButton ID="btnCloseTextos" runat="server" ImageUrl="~/img/ok16.png" ImageAlign="Middle" />
                            </div>
                        </asp:Panel>

                        
                        <cc1:ModalPopupExtender ID="mpeServicios" runat="server" TargetControlID="lnkShowPopUpServicios"
                                    PopupControlID="pnlServicios" CancelControlID="btnCloseServicios"
                                    BackgroundCssClass="modalBackground" PopupDragHandleControlID="pnlTituloServicios" 
                                    DynamicServicePath="" Enabled="True" />
                        
                        <asp:Panel ID="pnlServicios" runat="server" Visible="false" ScrollBars="Auto" Width="250px" CssClass="modalPopup">
                            <asp:Panel ID="pnlTituloServicios" runat="server" Width="250px" BackColor="LightBlue" HorizontalAlign="Center">
                                <asp:Label ID="Label4" runat="server" Text="Datos del Servicio" BackColor="LightBlue" Width="100%" />
                            </asp:Panel>
                            
                            <table border="1" class="tbl-params">
                                <tr><td>Nro pisos:</td>
                                    <td>
                                        <asp:TextBox ID="txtNpisos" runat="server" MaxLength="2" Width="50" />
                                        <cc1:FilteredTextBoxExtender ID="fteNpisos" runat="server" TargetControlID="txtNpisos" FilterType="Numbers" Enabled="True" />
                                    </td>
                                </tr>
                                <tr><td colspan="2" style="text-align: left;"><asp:CheckBox ID="chkAscensor" runat="server" Text="Ascensor" Checked="true" /></td></tr>
                            </table>
                            
                            <div style="width:100%; text-align:right; padding-top:5px;">
                                <asp:ImageButton ID="btnCloseServicios" runat="server" ImageUrl="~/img/ok16.png" ImageAlign="Middle" />
                            </div>
                        </asp:Panel>
                    </ContentTemplate>
                </cc1:TabPanel>
                <cc1:TabPanel ID="tpDetalle" runat="server">
                    <HeaderTemplate>Ingresar Materiales</HeaderTemplate>
                    <ContentTemplate>
                    
    <script type="text/javascript">
        function calendarShown(sender, args){
            sender._popupBehavior._element.style.zIndex = 99999999;
        }
    </script>
                    
                        <!-- Datos de Detalle -->
                        <cc2:CoolGridView ID="cgvMateriales" runat="server" CssClass="tbl-detalle" 
                                AutoGenerateColumns="False" GridLines="None" AllowResizeColumn="false"
                                AllowSorting="false" Height="230px" AllowPaging="false" Width="100%" 
                                OnRowDataBound="cgvMateriales_RowDataBound" OnPreRender="cgvMateriales_PreRender"                                
                                DefaultColumnWidth="1485px" ShowFooter="false" ShowHeader="true">
                                <Columns>
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            <table style="table-layout:fixed; width:1485px; border:0;">
                                                <tr>
                                                    <th style="width:30px;"><img src="img/del.png" alt="Del" title="Borrar" /></th>
                                                    <th style="width:30px;">Pos.</th>
                                                    <th style="width:80px;">Material</th>
                                                    <th style="width:200px;">Denominación</th>
                                                    <th style="width:70px;">Cantidad</th>
                                                    <th style="width:30px;">UM</th>
                                                    <th style="width:50px;">Rend.</th>
                                                    <th style="width:90px;">Centro</th>
                                                    <th style="width:90px;">Almacen</th>
                                                    <th style="width:90px;">Lote</th>
                                                    <th style="width:75px;">Precio unit. (PEN)</th>
                                                    <th style="width:75px;">Dcto.</th>
                                                    <th style="width:85px;">Reparto</th>
                                                    <th style="width:80px;">Sub-Total</th>
                                                    <th style="width:120px;">Grupo Mat.</th>
                                                    <th style="width:170px;">Motiv. Rechazo</th>
                                                    <th style="width:40px;">TPos</th>
                                                    <th style="width:50px;">P.Sup</th>
                                                    <th style="width:30px;">Fle.</th>
                                                </tr>
                                            </table>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <table style="table-layout:fixed; width:1485px; border:0;">
                                                <tr>
                                                    <td id="tcChkBorrar" runat="server" style="text-align:center;width:30px;">
                                                        <asp:CheckBox ID="chkBorrar" runat="server" ToolTip='<%# Bind("Posicion") %>' />
                                                        <asp:HiddenField ID="hidPosicion" runat="server" Value='<%# Bind("Posicion") %>' />
                                                    </td>
                                                    <td style="text-align:right;width:30px;">
                                                        <asp:Label ID="lblPosicion" runat="server" Text='<%# Bind("PosicionCorto") %>' />
                                                    </td>
                                                    <td style="text-align:center;width:80px;">
                                                        <asp:Label ID="lblCodMaterial" runat="server" Text='<%# Bind("CodMaterialCorto") %>' />
                                                    </td>
                                                    <td style="width:200px;">
                                                        <asp:HiddenField ID="hidMaterialId" runat="server" Value='<%# Bind("CodMaterial") %>' />
                                                        <asp:Label ID="lblDescMaterial" runat="server" Text='<%# Bind("DescMaterial") %>'
                                                            ToolTip='<%# Bind("CodMaterial") %>'></asp:Label>
                                                    </td>
                                                    <td style="text-align:center;width:70px;">
                                                        <cc1:FilteredTextBoxExtender ID="ftbeCantidad" TargetControlID="txtCantidad" FilterType="Custom,Numbers" ValidChars=".," runat="server" />
                                                        <asp:TextBox ID="txtCantidad" MaxLength="8" 
                                                            Text='<%# DataBinder.Eval(Container.DataItem, "Cantidad","{0:n3}") %>' 
                                                            runat="server" CssClass="inputbox-number" Width="50" />
                                                    </td>
                                                    <td style="text-align:center;width:30px;">
                                                        <asp:Label ID="lblUMedida" runat="server" Text='<%# Bind("CodUMedida") %>' ToolTip='<%# Bind("Peso") %>' />
                                                        <asp:HiddenField ID="hidPeso" runat="server" Value='<%# Bind("Peso") %>' />
                                                    </td>
                                                    <td style="text-align:center;width:50px;">
                                                        <asp:Label ID="lblRendimiento" runat="server" Text='<%# Bind("Rendimiento") %>' />
                                                        <asp:HiddenField ID="hidValorRendimiento" runat="server" Value='<%# Bind("ValorRendimiento") %>' />
                                                        <asp:HiddenField ID="hidUMedidaRendimiendo" runat="server" Value='<%# Bind("UMedidaRendimiendo") %>' />
                                                    </td>
                                                    <td style="text-align:center; vertical-align:top;width:90px;">
                                                        <asp:DropDownList ID="cmbCentro" runat="server" Width="80" AutoPostBack="true"
                                                            OnSelectedIndexChanged="cmbCentro_SelectedIndexChanged" />
                                                    </td>
                                                    <td style="text-align:center; vertical-align:top;width:90px;">
                                                        <asp:DropDownList ID="cmbAlmacen" runat="server" Width="80" AutoPostBack="true"
                                                            OnSelectedIndexChanged="cmbAlmacen_SelectedIndexChanged" />
                                                    </td>
                                                    <td style="text-align:center; vertical-align:top;width:90px;">
                                                        <asp:DropDownList ID="cmbLote" runat="server" Width="80" />
                                                    </td>
                                                    <td style="text-align:right;width:75px;">
                                                        <asp:Label ID="lblPrecioItem" runat="server" 
                                                            Text=' <%# DataBinder.Eval(Container.DataItem, "PrecioUnitario","{0:n2}") %>'></asp:Label>
                                                    </td>
                                                    <td style="text-align:center;width:75px;">
                                                        <asp:LinkButton ID="lnkDctoTotal" runat="server" 
                                                            Text='<%# DataBinder.Eval(Container.DataItem, "TotalDctos","{0:n2}") %>' />
                                                    </td>
                                                    <td style="text-align:center;width:85px;">
                                                        <asp:LinkButton ID="lnkReparto" runat="server" Text='<%# Bind("Reparto") %>' />
                                                    </td>
                                                    <td style="text-align:right; padding-right: 5px; width:80px;">
                                                        <asp:Label ID="lblSubTotalItem" runat="server" Text=' <%# DataBinder.Eval(Container.DataItem, "SubTotal","{0:n2}") %>'></asp:Label>
                                                    </td>
                                                    
                                                    <td style="text-align:center; vertical-align:top;width:120px;">
                                                        <asp:DropDownList ID="cmbGrupoMat" runat="server" Width="100" />
                                                    </td>
                                                    <td style="text-align:center; vertical-align:top;width:170px;">
                                                        <asp:DropDownList ID="cmbMotivoRechazo" runat="server" Width="170" />
                                                    </td>
                                                    
                                                    <td style="text-align:center; vertical-align:top;width:40px;">
                                                        <asp:Label ID="lblTipoPosicion" runat="server" Text='<%# Bind("TipoPosicion") %>' />
                                                    </td>
                                                    <td style="text-align:center; vertical-align:top;width:50px;">
                                                        <asp:Label ID="lblPosSup" runat="server" Text='<%# Bind("PosSupCorto") %>' />
                                                    </td>
                                                    <td id="tcChkServicio" runat="server" style="text-align:center;width:30px;">
                                                        <asp:CheckBox ID="chkServicio" runat="server" Checked='<%# Bind("Zservicio") %>' />
                                                    </td>
                                                </tr>
                                            </table>
                                            <!--------------------------------------------->
                                            <cc1:ModalPopupExtender ID="mpeReparto" runat="server" TargetControlID="lnkReparto"
                                                PopupControlID="pnlReparto"
                                                BackgroundCssClass="modalBackground" PopupDragHandleControlID="pnlTituloReparto" />
                                            <asp:Panel ID="pnlReparto" runat="server" ScrollBars="Auto" Width="300px" Height="320px" CssClass="modalPopup">
                                                <asp:Panel ID="pnlTituloReparto" runat="server" Width="300px" Height="16px" BackColor="lightblue" BorderColor="#6289AE" HorizontalAlign="Center">
                                                    <asp:Label ID="lblTituloReparto" runat="server" Text="Detalle de Reparto" />
                                                </asp:Panel>
                                            
                                            <asp:UpdatePanel ID="upRepartos" UpdateMode="Conditional" runat="server">
                                                <ContentTemplate>
                                                
                                                <table class="tbl-descuentos">
                                                    <tr>
                                                        <td>Prioridad Ent.:</td>
                                                        <td style="text-align:right;">
                                                            <asp:DropDownList ID="cmbPrioridadEnt" runat="server" Width="170px" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2" style="height:10px;" />
                                                    </tr>
                                                </table>
                                                
                                                <div style="width:100%; height:200px; overflow:scroll;">
                                                    <table id="tblRepartos" class="tbl-descuentos" border="1" runat="server">
                                                        <tr style="background-color:Silver;">
                                                            <th style="width: 10px;">&nbsp;</th>
                                                            <th>Fecha Entrega</th>
                                                            <th>Cant. Pedido</th>
                                                            <th>Cant. Conf.</th>
                                                        </tr>
                                                    </table>
                                                </div>
                                                
                                                <div style="width:100%; text-align:right; padding-top:5px;">
                                                    <asp:ImageButton ID="ibtnCloseReparto" runat="server" ImageUrl="~/img/ok16.png" 
                                                                    ImageAlign="Middle" OnClick="ibtnCloseReparto_Click" />
                                                </div>
                                                
                                                </ContentTemplate>
                                            </asp:UpdatePanel>
                                            
                                            </asp:Panel>
                                            <!--------------------------------------------->
                                            <cc1:ModalPopupExtender ID="mpeDctoTotal" runat="server" TargetControlID="lnkDctoTotal"
                                                PopupControlID="pnlDctoTotal" CancelControlID="ibtnCloseDctoTotal"
                                                BackgroundCssClass="modalBackground" PopupDragHandleControlID="pnlTituloDctoTotal" />
                                            <asp:Panel ID="pnlDctoTotal" runat="server" ScrollBars="Auto" Width="300px" CssClass="modalPopup" >
                                                <asp:Panel ID="pnlTituloDctoTotal" runat="server" Width="300px" BackColor="lightblue" BorderColor="#6289AE" HorizontalAlign="Center">
                                                    <asp:Label ID="lblTituloDctoTotal" runat="server" Text="Detalle de Descuentos" Width="100%" />
                                                </asp:Panel>
                                                <table cellpadding="2" cellspacing="2" class="tbl-descuentos">
                                                    <tr>
                                                        <th>Denominación</th>
                                                        <th>Importe</th>
                                                        <th>Valor</th>
                                                    </tr>
                                                    <tr><td style="height:10px; vertical-align:middle;" colspan="3"><hr /></td></tr>
                                                    <tr>
                                                        <td>ZD00 - Dcto. Decor %:</td>
                                                        <td class="importe">
                                                            <asp:TextBox ID="txtDctoDecorPorc" runat="server" CssClass="inputbox-number" Width="50" Text='<%# DataBinder.Eval(Container.DataItem, "DctoDecorPorc.Importe","{0:n2}") %>' />
                                                            <cc1:FilteredTextBoxExtender ID="fte1" TargetControlID="txtDctoDecorPorc" FilterType="Numbers,Custom" ValidChars=".,-" runat="server" />
                                                        </td>
                                                        <td class="valor">
                                                            <asp:Label ID="lblDctoDecorPorc" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "DctoDecorPorc.Valor","{0:n2}") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>ZD02 - Dcto. Adicional %:</td>
                                                        <td class="importe">
                                                            <asp:TextBox ID="txtDctoAdicionalPorc" runat="server" CssClass="inputbox-number" ReadOnly="true"
                                                                    Width="50" Text='<%# DataBinder.Eval(Container.DataItem, "DctoAdicionalPorc.Importe","{0:n2}") %>' />
                                                            <cc1:FilteredTextBoxExtender ID="fte6" TargetControlID="txtDctoAdicionalPorc" FilterType="Numbers,Custom" ValidChars=".,-" runat="server" />
                                                        </td>
                                                        <td class="valor">
                                                            <asp:Label ID="lblDctoAdicionalPorc" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "DctoAdicionalPorc.Valor","{0:n2}") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr><td style="height:5px; vertical-align:middle;" colspan="3"><hr /></td></tr>
                                                    <tr>
                                                        <td>ZD03 - Dcto. Estadístico %:</td>
                                                        <td class="importe">
                                                            <asp:TextBox ID="txtDctoEstadisticoPorc" runat="server" CssClass="inputbox-number" Width="50" Text='<%# DataBinder.Eval(Container.DataItem, "DctoEstadisticoPorc.Importe","{0:n2}") %>' />
                                                            <cc1:FilteredTextBoxExtender ID="fte2" TargetControlID="txtDctoEstadisticoPorc" FilterType="Numbers,Custom" ValidChars=".,-" runat="server" />
                                                        </td>
                                                        <td class="valor">
                                                            <asp:Label ID="lblDctoEstadisticoPorc" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "DctoEstadisticoPorc.Valor","{0:n2}") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>ZD04 - Dcto. Gerencia %:</td>
                                                        <td class="importe">
                                                            <asp:TextBox ID="txtDctoGerenciaPorc" runat="server" CssClass="inputbox-number" Width="50" Text='<%# DataBinder.Eval(Container.DataItem, "DctoGerenciaPorc.Importe","{0:n2}") %>' />
                                                            <cc1:FilteredTextBoxExtender ID="fte3" TargetControlID="txtDctoGerenciaPorc" FilterType="Numbers,Custom" ValidChars=".,-" runat="server" />
                                                        </td>
                                                        <td class="valor">
                                                            <asp:Label ID="lblDctoGerenciaPorc" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "DctoGerenciaPorc.Valor","{0:n2}") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>ZD05 - Dcto. Gerenc Importe:</td>
                                                        <td class="importe">
                                                            <asp:TextBox ID="txtDctoGerenciaMonto" runat="server" CssClass="inputbox-number" Width="50" Text='<%# DataBinder.Eval(Container.DataItem, "DctoGerenciaMonto.Importe","{0:n2}") %>' />
                                                            <cc1:FilteredTextBoxExtender ID="fte4" TargetControlID="txtDctoGerenciaMonto" FilterType="Numbers,Custom" ValidChars=".,-" runat="server" />
                                                        </td>
                                                        <td class="valor">
                                                            <asp:Label ID="lblDctoGerenciaMonto" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "DctoGerenciaMonto.Valor","{0:n2}") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>ZD06 - Dcto. Serv.Vendedor %:</td>
                                                        <td class="importe">
                                                            <asp:TextBox ID="txtDctoZD06" ReadOnly="true" runat="server" CssClass="inputbox-number" Width="50" Text='<%# DataBinder.Eval(Container.DataItem, "DctoZD06.Importe","{0:n2}") %>' />
                                                            <cc1:FilteredTextBoxExtender ID="fteDctoZD06" TargetControlID="txtDctoZD06" FilterType="Numbers,Custom" ValidChars=".,-" runat="server" />
                                                        </td>
                                                        <td class="valor">
                                                            <asp:Label ID="lblDctoZD06" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "DctoZD06.Valor","{0:n2}") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>ZD07 - Dcto. Serv.Jef.Tiend %:</td>
                                                        <td class="importe">
                                                            <asp:TextBox ID="txtDctoZD07" ReadOnly="true" runat="server" CssClass="inputbox-number" Width="50" Text='<%# DataBinder.Eval(Container.DataItem, "DctoZD07.Importe","{0:n2}") %>' />
                                                            <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" TargetControlID="txtDctoZD06" FilterType="Numbers,Custom" ValidChars=".,-" runat="server" />
                                                        </td>
                                                        <td class="valor">
                                                            <asp:Label ID="lblDctoZD07" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "DctoZD07.Valor","{0:n2}") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr><td style="height:5px; vertical-align:middle;" colspan="3"><hr /></td></tr>
                                                    <tr>
                                                        <td>ZP01 - Diferencia:</td>
                                                        <td class="importe">
                                                            <asp:TextBox ID="txtDiferencia" ReadOnly="true" runat="server" CssClass="inputbox-number" Width="50" Text='<%# DataBinder.Eval(Container.DataItem, "Diferencia.Importe","{0:n2}") %>' />
                                                            <cc1:FilteredTextBoxExtender ID="fteDiferencia" TargetControlID="txtDiferencia" FilterType="Numbers,Custom" ValidChars=".," runat="server" />
                                                        </td>
                                                        <td class="valor">
                                                            <asp:Label ID="lblDiferencia" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Diferencia.Valor","{0:n2}") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>ZP08 - Pr.Srv.Transp.Manual:</td>
                                                        <td class="importe">
                                                            <asp:TextBox ID="txtPreZP08" ReadOnly="true" runat="server" CssClass="inputbox-number" Width="50" Text='<%# DataBinder.Eval(Container.DataItem, "PreZP08.Importe","{0:n2}") %>' />
                                                            <cc1:FilteredTextBoxExtender ID="ftePreZP08" TargetControlID="txtPreZP08" FilterType="Numbers,Custom" ValidChars=".," runat="server" />
                                                        </td>
                                                        <td class="valor">
                                                            <asp:Label ID="lblPreZP08" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "PreZP08.Valor","{0:n2}") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr><td style="height:5px; vertical-align:middle;" colspan="3"><hr /></td></tr>
                                                    <tr>
                                                        <td>Precio Bruto:</td>
                                                        <td class="importe">
                                                            <asp:Label ID="lblPrecioUnitario" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "PrecioUnitario","{0:n2}") %>' />
                                                        </td>
                                                        <td class="valor">
                                                            <asp:Label ID="lblPrecio" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "PrecioTotal","{0:n2}") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>Total Dctos:</td>
                                                        <td class="importe">
                                                            &nbsp;
                                                        </td>
                                                        <td class="valor">
                                                            <asp:Label ID="lblTotalDctos" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "TotalDctos","{0:n2}") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr><td style="height:10px; vertical-align:bottom;" colspan="3"><hr /></td></tr>
                                                    <tr>
                                                        <td>Precio Neto:</td>
                                                        <td class="importe">
                                                            &nbsp;
                                                        </td>
                                                        <td class="valor">
                                                            <asp:Label ID="lblPrecioNeto" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "SubTotal","{0:n2}") %>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>Impuesto %:</td>
                                                        <td class="importe">
                                                            <asp:Label ID="lblIgvUnitario" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "IgvUnitario","{0:n2}") %>' />
                                                        </td>
                                                        <td class="valor">
                                                            <asp:Label ID="lblIgvTotal" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "IgvTotal","{0:n2}") %>' />
                                                        </td>
                                                    </tr>
                                                </table>
                                                <div style="width:100%; text-align:right; padding-top:5px;">
                                                    <asp:ImageButton ID="ibtnCloseDctoTotal" runat="server" ImageUrl="~/img/ok16.png" ImageAlign="Middle" />
                                                </div>
                                            </asp:Panel>
                                            <!--------------------------------------------->
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                        </cc2:CoolGridView>
                        
                        <table style="table-layout:fixed; width:800px; border:0;">
                            <tr>
                                <td style="width:30px;"></td>
                                <td style="width:30px;">&nbsp;</td>
                                <td style="width:80px;">Código</td>
                                <td style="width:200px;">Descripción Material</td>
                                <td style="width:70px;"> Cantidad </td>
                            </tr>
                            
                            <tr>
                                <td style="width:30px;"><asp:ImageButton ID="ibtnAddNuevoMat"  runat="server" ImageAlign="Middle" ImageUrl="~/img/add.png" 
                                                                    AlternateText="Add" ToolTip="Añadir" OnClick="ibtnAddNuevoMat_Click" /></td>
                                <td style="width:30px;">&nbsp;</td>
                                <td style="width:80px;">
                                    <asp:TextBox ID="txtCodNuevoMat" runat="server" CssClass="inputbox" Width="70" />
                                    <cc1:FilteredTextBoxExtender ID="fteCodNuevoMat" TargetControlID="txtCodNuevoMat" FilterType="Numbers" runat="server" />
                                </td>
                                <td style="width:200px;">
                                    <asp:TextBox ID="txtDescNuevoMat" runat="server" CssClass="inputbox" Width="190" />
                                    <cc1:AutoCompleteExtender ID="aceNuevoMat" runat="server" TargetControlID="txtDescNuevoMat"
                                        MinimumPrefixLength="3" CompletionInterval="100" CompletionSetCount="5"
                                        CompletionListCssClass="autocomplete_completionListElement"
                                        CompletionListItemCssClass="autocomplete_listItem"
                                        CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
                                        DelimiterCharacters=""
                                        ServiceMethod="buscaMateriales"
                                        OnClientItemSelected="getCodNuevoMat" Enabled="True" ServicePath="">
                                    </cc1:AutoCompleteExtender>
                                </td>
                                <td style="width:70px;">
                                    <asp:TextBox ID="txtCantNuevoMat" runat="server" CssClass="inputbox" Width="50" />
                                    <cc1:FilteredTextBoxExtender ID="fteCantNuevoMat" TargetControlID="txtCantNuevoMat" FilterType="Numbers,Custom" ValidChars=".," runat="server" />
                                </td>
                                <td style="width:390px;" />
                            </tr>
                        </table>
                        
                        <asp:LinkButton ID="lnkAddItems" runat="server" Text="Buscar materiales..." ToolTip="Click aqui para añadir materiales" OnClick="lnkAddItems_Click" />
                    </ContentTemplate>
                </cc1:TabPanel>
            </cc1:TabContainer>
    </div>
    </form>
</body>
</html>
